package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Account  string `gorm:"type:varchar(20);not null;comment:'账号'"`
	Password string `gorm:"type:char(32);not null;comment:'密码'"`
	Mobile   string `gorm:"type:char(11);not null;comment:'手机号'"`
}

type Shop struct {
	gorm.Model
	Name     string `gorm:"type:varchar(20);not null;comment:'商家名称'"`
	Slice    int    `gorm:"type:int;not null;comment:'评分'"`
	Sales    int    `gorm:"type:varchar(20);not null;comment:'商家名称'"`
	Distance string `gorm:"type:varchar(20);not null;comment:'距离'"`
	Address  string `gorm:"type:varchar(100);not null;comment:'商家地址'"`
	Status   string `gorm:"type:enum('在线','下班');not null;comment:'商家状态'"`
}

type ShopName struct {
	gorm.Model
	ShopId int     `gorm:"type:int;not null;comment:'商家id'"`
	Name   string  `gorm:"type:varchar(20);not null;comment:'商品名称'"`
	Price  float64 `gorm:"type:decimal(10,2);not null;comment:'商品价格'"`
	Stock  int     `gorm:"type:int;not null;comment:'库存'"`
}
